home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 051-075 / disk_064 / readmes / compilingiff < prev    next >
Text File  |  1992-05-06  |  4KB  |  104 lines

  1.  
  2.                  >>> Tips for Compiling IFF Examples <<<
  3.                          Carolyn Scheppner - CBM
  4.  
  5.       IFF examples, in most cases, are not self-contained programs.
  6.    They need to be linked with various IFF modules which contain
  7.    the IFF reader/writer/general routines that are used both directly
  8.    and indirectly by the example.  Information on which IFF modules
  9.    are required by the EA examples in the SOURCE directory can be found
  10.    in the lnk.files directory.  The examples in the EXAMPLES directory
  11.    contain linkage information in their opening comments, and .with
  12.    files are supplied for those which must be linked with IFF modules.
  13.    See the AmigaDos Developer's Manual "The Linker" chapter for more
  14.    info on WITH files.  Examples and modules are listed below.
  15.  
  16.      The IFF header (.h) files are also required when compiling the
  17.    examples.  The headers can be found in the INCLUDE/iff directory.
  18.    I will assume that you have set up your C development system
  19.    so that there is plenty of room on your source & headers work disk.
  20.    Make an "iff" subdirectory in your "include" directory and copy
  21.    the IFF headers there.  Note for AZTEC C people: get rid of the
  22.    comments inside the parentheses in the function definitions in
  23.    packer.h.
  24.  
  25.       Make a directory (or directories) on your work disk for the IFF
  26.    object (.o) modules.  Since I work out of ram:, I keep the IFF
  27.    modules in 3 directories (iffrobj, iffwobj, iffobj).  Then I
  28.    can easily copy just the ones I need to ram:.  The object modules
  29.    you need are listed below (IFF reader, writer, general modules).
  30.    Note for AZTEC C people: These are Amiga C object modules.  Copy
  31.    the source (.c) for the modules to your C work disk and recompile
  32.    them with AZTEC (without linking).  The compiler.h header contains
  33.    a switch (FDwAT) for compatibility with various compilers.  You
  34.    may have to change the value of this switch.  In addition, you may
  35.    find it necessary to link with your 32 bit library.  I use Lattice
  36.    but I would appreciate a list of any changes needed in the IFF
  37.    source for compilation under Manx.  I could include the list on
  38.    the next release of this disk, or possibly incorporate the changes
  39.    into the source.
  40.  
  41.       To compile an example, copy the example source (.c) file to
  42.    your C work disk (or ram: if that's where you work).  Compile
  43.    the file WITHOUT linking it.  You should now have a .o file for
  44.    the example.
  45.  
  46.    (Note: Following linkage instructions are for Amiga C but should
  47.            be helpful with other development systems as well)
  48.  
  49.       Use your editor to create a WITH file for the example.  You
  50.    can start with the appropriate file from modified.lnk.files.
  51.    Add the proper paths to the filenames so that ALINK can find
  52.    each of the files.
  53.  
  54.       For example, if Example.o was in df1:obj, the IFF .o modules
  55.    were all in df1:iffobj, your startup and lib's were in df0:lib,
  56.    and you wanted your executable placed in df1:executables, this
  57.    would be your Example.with file:
  58.  
  59.    FROM     df0:lib/LStartup.obj, df1:obj/Example.o, df1:iffobj/iffr.o,*
  60.             df1:iffobj/ilbmr.o, df1:iffobj/unpacker.o
  61.    TO       df1:executables/Example
  62.    LIBRARY  df0:lib/LC.lib, df0:lib/Amiga.lib
  63.  
  64.       When I'm working with IFF, I keep my files and all of the IFF .o
  65.    modules I need in ram:, and I'm cd'd there.  I assign the label LIB:
  66.    to the directory containing my startup code and linker libraries.
  67.    This is my Display.with:
  68.  
  69.    FROM     LIB:AStartup.obj,Display.o,myreadpict.o,iffmsgs.o*
  70.             iffr.o,ilbmr.o,unpacker.o
  71.    TO       Display
  72.    LIBRARY  LIB:Amiga.lib, LIB:LC.lib
  73.  
  74.  
  75.       Linking is easy once you've set up the .with file:
  76.  
  77.              Alink with Display.with
  78.  
  79.  
  80.  -------------------------------------------------------------------------
  81.                       >>> List of IFF modules <<<
  82.  
  83.    IFF reader modules:
  84.  
  85.    iffr.o      Lowest level reader rtns
  86.    ilbmr.o     Higher level ILBM reader rtns
  87.    readpict.o  Highest level ILBM reader
  88.    unpacker.o  Unpacking rtn
  89.  
  90.    IFF writer modules:
  91.  
  92.    iffw.o      Lowest level writer rtns
  93.    ilbmw.o     Higher level ILBM writer rtns
  94.    putpict.o   Highest level ILBM writer
  95.    packer.o    Packing rtn
  96.  
  97.    General IFF modules:
  98.  
  99.    gio.o       Fast IO rtns
  100.    remalloc.o  Memory allocation rtns
  101.  
  102. --------------------------------------------------------------------------
  103.  
  104.